package org.idea.qiyu.mq.local.queue.jdk;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @Author linhao
 * @Date created in 7:31 下午 2021/11/26
 */
public class LinkedBlockingQueueDemo {

    static LinkedBlockingQueue<String> linkedBlockingQueue = new LinkedBlockingQueue(19);


    public static void main(String[] args) {

    }

    static class LinkedBlockingQueueConsumerThread implements Runnable {

        @Override
        public void run() {
            while (true){
                try {
                    Thread.sleep(1000);
                    linkedBlockingQueue.poll();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
